app.factory('zhuan', function ($http, $q) {
    var zhuan = [];
    var def =  $q.defer();
    $http.get('./data/zhuan.json').success(function(data){ 
             for (var i = 0; i < data.data.length; i++) {
                    var zhuanGoodInfo = {};
                        zhuanGoodInfo.pId = 'pId' + i;
                        zhuanGoodInfo.residue =  data.data[i].residue;
                        zhuanGoodInfo.cprice = data.data[i].cprice;
                        zhuanGoodInfo.oprice = data.data[i].oprice;
                        zhuanGoodInfo.title = data.data[i].title;
                        zhuanGoodInfo.pic_url  =  data.data[i].picurl;
                        zhuan.push(zhuanGoodInfo);
             }
             def.resolve(zhuan);
     });         
     return def.promise;
 });
